<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ActivityTeam extends Model
{

    protected $table = 'activity_team';



    public function getOneNumber($id){

        return $this->where('userid',$id)->count();
    }

    public function user(){
        return $this->belongsTo('App\User','userid');
    }

    public function getUser($id){
        return $this->where('userid',$id)->get();
    }

    public function getTwoNumber($id){
        return $this->where('userid',$id)->count();
    }
}
